import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/index.vue'), 
      children:[
        {
          path: '/index/agreement',
          name: 'agreement',
          component: () => import('../views/index/agreement.vue'), 
      
      },
      {
        path: '/index/agreedetail',
        name: 'agreedetail',
        component: () => import('../views/index/agreedetail.vue'), 
      },
      {
        path: '/index/agreechange',
        name: 'agreechange',
        component: () => import('../views/index/agreechange.vue'), 
      },
      {
        path: '/index/agreeadd',
        name: 'agreeadd',
        component: () => import('../views/index/agreeadd.vue'), 
      },
      {
        path: '/index/money',
        name: 'money',
        component: () => import('../views/index/money.vue'), 
      },
      {
        path: '/index/orderManage',
        name: 'orderManage',
        component: () => import('../views/index/orderManage.vue'), 
      },
      {
        path: '/index/projectManage',
        name: 'projectManage',
        component: () => import('../views/index/projectManage.vue'), 
      },
      {
        path: '/index/goodPerson',
        name: 'goodPerson',
        component: () => import('../views/index/goodPerson.vue'), 
      },
      
      {
        path: '/index/home',
        name: 'home',
        component: () => import('../views/index/home.vue'), 
    
      },


    // 青山路由
        {
           path: '/index/changePerson',
           name: 'changePerson',
           component: () => import('../views/index/changePerson.vue'),
          },
          {
           path: '/index/lookPerson',
           name: 'lookPerson',
           component: () => import('../views/index/lookPerson.vue'),
          },
          {
           path: '/index/addPerson',
           name: 'addPerson',
           component: () => import('../views/index/addPerson.vue'),
          },
          {
           path: '/index/searchPerson:name',
           name: 'searchPerson',
           component: () => import('../views/index/searchPerson.vue'),
          },


        // 刘建豪滴
        {
          path: '/index/detail',
          name: 'index/detail',
          component: () => import('../views/index/detail.vue'),
        },

        {
          path: '/index/change:row',
          name: 'change',
          component: () => import('../views/index/change.vue'),
        },

        {
          path: '/index/personadd',
          name: 'personadd',
          component: () => import('../views/index/personadd.vue'),

        },
        {
          path: '/index/search_person:name',
          name: 'search_person',
          component: () => import('../views/index/search_person.vue'),

        },


        // 阿龙
        {
          path: '/index/orderManage',
          name: 'orderManage',
          component: () => import('../views/index/orderManage.vue'),
        },
        {

          path: '/index/mealManage',
          name: 'mealManage',
          component: () => import('../views/index/orderManage/MealManage.vue')

        },
        {

          path: '/index/sell',
          name: 'sell',
          component: () => import('../views/index/orderManage/GoodsSell.vue')

        },
        {
          path:'/index/record',
          name:'record',
          component:()=> import('../views/index/orderManage/OrderRecord.vue')
        },
        {
          path:'/index/recordDetails/:id',
          name:'recordDetails',
          component:()=> import('../views/index/orderManage/RecordDetails.vue')
        },      
        
        // gy
        {
          path: '/index/projectInfo',
          name: 'projectinfo',
          component: () => import('../views/index/projectinfo/projectinfo.vue'),
      },
      {
          path: '/index/projectEdit',
          name: 'projectedit',
          component: () => import('../views/index/projectinfo/projectedit.vue'),
      },
      {
          path: '/index/projectadd',
          name: 'projectadd',
          component: () => import('../views/index/projectinfo/projectadd.vue'),
      },

      ]

      
  },
// 登录注册
  {
     path: '/register',
     name: 'register',
     component: () => import('../views/register.vue'),
    },
    {
     path: '/login',
     name: 'login',
     component: () => import('../views/login.vue'),
    },

  {
    path:"/",
    redirect:"/index/home"
  }
  ]

})


export default router
